//
//  MYXMYXWithdrawalsCell.m
//  meiyinxiang
//
//  Created by 陈李飞 on 2017/12/1.
//  Copyright © 2017年 hbjApple. All rights reserved.
//

#import "MYXMYXWithdrawalsCell.h"

@implementation MYXMYXWithdrawalsCell

- (void)awakeFromNib {
    [super awakeFromNib];
    [self setAwakeConfig];
}
- (IBAction)Button:(UIButton *)sender {
    self.ZhifuButton.selected = !self.ZhifuButton.selected;
    self.chantButton.selected = !self.ZhifuButton.selected;
}
- (IBAction)ChantB:(id)sender {
   self.chantButton.selected = !self.chantButton.selected;
   self.ZhifuButton.selected = !self.chantButton.selected;
}
- (IBAction)WithdrawalsButt:(id)sender {
   // self.moneyTF.text =
}
- (void)setAwakeConfig{
    self.ZhifuButton.selected = YES;
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moneyTextfield) name:UITextFieldTextDidChangeNotification object:self.moneyTF];
    UITapGestureRecognizer *tapGes = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapAct)];
    self.clickAllCashMoneyLabel.userInteractionEnabled = YES;
    [self.clickAllCashMoneyLabel addGestureRecognizer:tapGes];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (void)setAllCashMoney:(NSString *)allCashMoney{
    _allCashMoney = allCashMoney;
    self.restMoneyLabel.text = [NSString stringWithFormat:@"余额%@",allCashMoney];
   
}
- (void)tapAct{
    self.moneyTF.text = self.allCashMoney;
}
- (void)moneyTextfield{
    CGFloat moneyNum = self.moneyTF.text.floatValue;
    if (moneyNum > 0 && moneyNum < 0.1) {
        self.moneyTF.text = @"0.10";
        ShowSVProgressErrorMessage(@"您好提现金额不能低于0.1元");
        //[SVProgressHUD showErrorWithStatus:@"您好提现金额不能低于0.1元"];
    }
}
- (void)dealloc{
    [[NSNotificationCenter defaultCenter] removeObserver:self];
}
@end
